
module TestClientManager where

import Client
import DBS
import ClientManager
import IdObject

f1, f2, f3 :: Client
f1 = Client 1 ("Adam", "Kowalski", "12.06.1981", "Pl. Politechniki 1 Warszawa")
f2 = Client 2 ("Amon", "Re", "29.02.-2700", "Giza")
f3 = Client 3 ("Zygmunt", "III Waza", "20.06.1566", "Szwedzki zamek Gripsholm")
f4 = Client 4 ("Obi-wan", "Kenobi", "2.01.19981", "Tatooine")
d1, d2, d3 :: DBS
d1 = insertClient (getClientInfo f1) empty
d2 = insertClient (getClientInfo f2) d1
d3 = insertClient (getClientInfo f3) d2
d4 = insertClient (getClientInfo f4) d3

d44 = updateClient (getId f3) d4 4 "Zamek krolewski w Warszawie"
d444 = updateClient (getId f4) d4 3 "3.01.-19981"

f11 = searchClient "Zygmunt" d4
-- f3
f22 = searchClient "wan" d4
-- f4
f33 = searchClient "4.01" d4
-- []
f44 = searchClient ".-" d4
-- f2
